package com.ruoyi.wechat.api;


import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.wechat.domain.Banner;
import com.ruoyi.wechat.service.IBannerService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(value = "广告列表",tags = {"广告列表"})
@RestController
@RequestMapping("/wechat/banner")
public class WxBannerController extends BaseController {
    @Autowired
    private IBannerService bannerService;
    @ApiOperation("查询广告列表")
    @GetMapping("/list")
    public TableDataInfo list(Banner banner)
    {
//        startPage();
        List<Banner> list = bannerService.selectBannerList(banner);
        return getDataTable(list);
    }
}
